package com.qing.springcloud.exception;

/**
 * @author caozhipeng
 * @date 2025/7/11
 * @description 异常类型枚举类
 */
public enum ExceptionTypeEnum {

    USER_NOT_EXIST(1001, "用户不存在"),
    USER_EXIST(1002, "用户已存在"),
    USER_NOT_LOGIN(1003, "用户未登录"),
    USER_NOT_AUTHORIZED(1004, "用户未授权"),
    USER_NOT_FRIEND(1005, "用户不是好友"),
    USER_NOT_BLACKLIST(1006, "用户不是黑名单"),
    USER_NOT_GROUP_MEMBER(1007, "用户不是群组成员"),
    USER_NOT_GROUP_LEADER(1008, "用户不是群主"),

    GROUP_NOT_EXIST(2001, "群组不存在"),
    GROUP_EXIST(2002, "群组已存在"),

    MESSAGE_NOT_EXIST(3001, "消息不存在"),
    MESSAGE_EXIST(3002, "消息已存在"),
    MESSAGE_NOT_READ(3003, "消息未读"),
    MESSAGE_NOT_SENT(3004, "消息未发送"),
    MESSAGE_NOT_RECEIVED(3005, "消息未接收"),
    MESSAGE_NOT_DELETED(3006, "消息未删除"),
    MESSAGE_NOT_UPDATED(3007, "消息未更新"),
    MESSAGE_NOT_CREATED(3008, "消息未创建"),

    FILE_NOT_EXIST(4001, "文件不存在"),
    FILE_EXIST(4002, "文件已存在"),
    FILE_NOT_UPLOADED(4003, "文件未上传"),
    FILE_NOT_DOWNLOADED(4004, "文件未下载"),
    FILE_NOT_DELETED(4005, "文件未删除"),
    FILE_NOT_UPDATED(4006, "文件未更新"),
    FILE_NOT_CREATED(4007, "文件未创建"),

    LOGIN_PASSWORD_ERROR(5001, "用户密码错误"),

    SYSTEM_ERROR(9999, "系统错误");

    private Integer code;

    private String message;

    private ExceptionTypeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
